const CryptoJS = require('crypto-js');
let data = 'Aa123456';
function Encrypt(data) {
  var key = CryptoJS.enc.Base64.parse('9GwBZWcqgn65fSgZvKUsp15iq/n7+Ev75aiQgl+ls/4='),
    iv = CryptoJS.enc.Base64.parse('Oq6XKxyQVT7nowajUFj0wg=='),
    encrypted = CryptoJS.AES.encrypt(data.toString(), key, {
      iv: iv,
      mode: CryptoJS.mode.CBC,
      padding: CryptoJS.pad.Pkcs7,
    });
  return encrypted.ciphertext
    .toString(CryptoJS.enc.Base64)
    .replaceAll('+', '_')
    .replaceAll('/', '-');
}

console.log(Encrypt(data));
let z = Encrypt(data);
z = z.substr(0, 10) + '9GwBZWcqgn65fSgZvKUsp15iq/n7+Ev75aiQgl+ls/4=' + z.substr(10);
z = z.substr(0, 13) + 'Oq6XKxyQVT7nowajUFj0wg==' + z.substr(13);
z = z.replaceAll('+', '_').replaceAll('/', '-') + '======';
console.log(z);
